package pojo;

import java.util.Objects;

public class Admin {
    private int account;
    private String password;
    private String manaName;
    private String manaTel;
    private boolean isSuper;

    public Admin() {
    }

    public Admin(int account, String password, String manaName, String manaTel, boolean isSuper) {
        this.account = account;
        this.password = password;
        this.manaName = manaName;
        this.manaTel = manaTel;
        this.isSuper = isSuper;
    }

    public int getAccount() {
        return account;
    }

    public void setAccount(int account) {
        this.account = account;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getManaName() {
        return manaName;
    }

    public void setManaName(String manaName) {
        this.manaName = manaName;
    }

    public String getManaTel() {
        return manaTel;
    }

    public void setManaTel(String manaTel) {
        this.manaTel = manaTel;
    }

    public boolean isSuper() {
        return isSuper;
    }

    public void setSuper(boolean aSuper) {
        isSuper = aSuper;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Admin admin = (Admin) o;
        return account == admin.account &&
                isSuper == admin.isSuper &&
                Objects.equals(password, admin.password) &&
                Objects.equals(manaName, admin.manaName) &&
                Objects.equals(manaTel, admin.manaTel);
    }

    @Override
    public int hashCode() {
        return Objects.hash(account, password, manaName, manaTel, isSuper);
    }

    @Override
    public String toString() {
        return "Admin{" +
                "account=" + account +
                ", password='" + password + '\'' +
                ", manaName='" + manaName + '\'' +
                ", manaTel='" + manaTel + '\'' +
                ", isSuper=" + isSuper +
                '}';
    }
}
